1. Field of the Invention
The present invention relates generally to a data processing system and in particular to a method and apparatus for managing data. More particularly, the present invention is directed to a computer-implemented method, apparatus, and computer-usable program code for managing data in a hybrid drive system.
2. Description of the Related Art
Modern data processing systems have begun using hybrid drive systems to manage data. A hybrid drive system includes a storage device, such as a hard disk, and a cache of memory to buffer data that is passed to or retrieved from the hybrid drive system. The cache in a hybrid drive system is typically employed to decrease the amount of time that a hard disk in the hybrid drive system must be in a spin state. A storage device, such as a hard disk, is in a spin state when the storage device is in motion. The hard disk of a hybrid drive system is normally at rest, and only enters a spin state in particular situations.
When a write operation is performed in a hybrid drive system, the cache is used to store data that would normally have been written to the hard disk in order to prevent having to spin the hard disk for a write operation. For example, while working on a text document or browsing on the Internet, temporary save files are saved to the cache instead of being written to the hard disk. When a read operation is performed in a hybrid drive system, the data processing system determines whether the requested data may be retrieved from the cache without resorting to the hard disk. Retrieving the requested data from the cache without resorting to the hard disk allows the requested data to be retrieved without having to spin the hard disk.
Conventional hard disks that do not employ a cache must be spun each time a read or write operation is performed on the hard disk. For example, if an application requests data that resides on the hard disk, the hard disk must be in a spin state in order for the data to be read. Likewise, if an application sends data to be written to a hard disk, the hard disk must be in a spin state in order for the data to be written to the hard disk.
Spinning the hard disk each time a read or write operation takes place increases the amount of time that the hard disk must be in a spin state. Increasing the amount of time that the hard disk is in a spin state increases the amount of power consumed by the hard disk. This increased power consumption leads to a reduction in the battery life of some data processing systems, such as laptop computers. In addition, the hard disk experiences increased wear, generates additional heat, and emits more noise while in a spin state for extended periods of time.
One current method implemented by some hybrid drive systems transfers the entire data content of the cache to the hard disk when the cache becomes full. However, because this method requires that the hard disk enter a spin state each time the cache becomes full, the method leads to increased power consumption, increased hard disk wear, increased heat generation, and increased noise emission.
Another current method implemented by some hybrid drive systems retrieves requested data directly from the hard drive if the requested data cannot be retrieved from the cache, thereby requiring that the hard disk enter a spin state. However, this method fails to implement additional transfers of data that are unrelated to the requested data so as to prevent having to spin the hard disk at a later time. Hence, the hard disk must be spun unnecessarily at a later time, thereby leading to increased power consumption, increased hard disk wear, increased heat generation, and increased noise emission.
Another current approach implemented by some hybrid drive systems allows the cache contained on a detachable memory device to be detached from the data processing system. However, this approach fails to provide a solution to the detachment of a cache while an operation associated with the cache is being performed. Thus, a loss of data may result if the cache is detached from the data processing system when an operation is being performed on the cache. This approach also fails to address flexibility issues regarding cache parameters, such as cache size and the encryption of data stored in the cache. Additionally, a user is precluded from expanding the amount of cache by adding additional detachable memory components to the data processing system.